<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>WebView</title>
    <style type="text/css">
        body {
            background: #cbcc1a;
        }

        .btn {
            line-height: 40px;
            margin: 10px;
            background: #CCCCCC;
        }

    </style>
</head>

<body>

<h2>WebView</h2>

<div>
    <span>请输入要传递的值：</span>
    <input type="text" id="input">
</div>

<div id="btn">
    <span class="btn">点我</span>
</div>

<script type="text/javascript">
        var btnEle = document.getElementById("btn");
        var inputEle = document.getElementById("input");
        btnEle.addEventListener("click", function() {
            var str = inputEle.value;
            if(window.jsTest){
                jsTest.setValue(str);
            }else{
               alert("jsTest not found!"); 
            }
            
        });

        var remote = function(str){
            inputEle.value = str;
        }

    </script>



</body>


</html>
